package com.yugao.fintech.antelope.pay.common.model.mq;

import com.yugao.fintech.antelope.base.model.module.mq.AbstractMQ;
import com.yugao.fintech.antelope.base.model.module.mq.BaseMqPayload;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
*
* 定义MQ消息格式
* 业务场景： [ 支付订单的商户通知消息 ]
*

*/
@Data
@EqualsAndHashCode(callSuper = true)
public class MchNotifyMQ extends AbstractMQ {
    /**
     * 再次通知的延时队列
     */
    public static final String DELAY_QUEUE = "pay_service.mch_notify.delay.queue";
    public static final String ROUTE_KEY = "pay_service.mch_notify.key";

    public MchNotifyMQ(MsgPayload msgPayload) {
        super(msgPayload);
    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    public static class MsgPayload extends BaseMqPayload {
        /** 通知单号 **/
        private Long notifyId;
    }

    public static MchNotifyMQ build(Long notifyId){
        return new MchNotifyMQ(new MsgPayload(notifyId));
    }
}
